﻿#region

using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using JsMapper.BO.Attributes;

#endregion

namespace JsMapper.ExampleImplementation.Models
{ 
    [JsModel("api/employee")]
    public class Employee
    {
        [Key]
        public int Id { get; set; }

        [Required, MaxLength(30)]
        public string Name { get; set; }

        [Required]
        public Company EmployerOf { get; set; }

        [MinLength(2), DefaultValue("Mr.")]
        public string Salutation { get; set; }

        [EmailAddress]
        public string EmailAddress { get; set; }

        [IgnoreForJsModel]
        public bool IsLazy { get; set; }
    }
}